# -*- coding: utf-8 -*-
# @Author: QX
# @File: day7_0071touchaction.py
'''
第7课：
1.高级手势TouchAction
from appium.webdriver.common.touch_action import TouchAction
1.创建 TouchAction 对象---action=TouchAction(driver)
2.通过对象调用想执行的手势---action.press(x=227,y=729).wait(1000).move_to(x=454,y=948).wait(1000).move_to(x=666,y=951).wait(1000).move_to(x=666,y=1170).release().perform()
sleep(3)
3.通过 perform() 执行动作

动作：
按压：tap
1.TouchAction(driver).tap(element=None, x=None, y=None).perform()
按下press和抬起release
2.TouchAction(driver).press(el=None, x=None, y=None).perform()
  TouchAction(driver).release().perform()
3.等待操作wait
TouchAction(driver).wait(ms=0).perform()
4.长按操作long_press
TouchAction(driver).long_press(el=None, x=None, y=None, duration=1000).perform()
5.移动操作move_to
TouchAction(driver).move_to(el=None, x=None, y=None).perform()
6.滑动和拖拽事件swipe,scroll,drag_and_drop
driver.swipe(startX,startY,endX,endY,duration=None)
driver.scroll(ele1,ele2)
driver.drag_and_drop(ele1,ele2)


'''
